package Engine;

import java.awt.Canvas;

import javax.swing.JFrame;

/**
 * Game window.
 * @author Lueko
 *
 */
public class Window extends JFrame {

	private static final long serialVersionUID = 1L;
	
	private String title;
	
	public Window(String title, Canvas canvas) {
		this.title = title;
		setTitle(title);
		setResizable(false);
		add(canvas);
		pack();

        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setLocationRelativeTo(null);
        setVisible(true);
	}
	
	public void setNewTitle(String title) {
	    this.title = title;
	    setTitle(title);
	}
	
	public String getRealTitle() {
	    return title;
	}
	
}
